package com.peter.design.pattern.chain.auth.optimiaze;

import com.peter.design.pattern.chain.auth.Member;

/**
 * @Auther: 肖冬
 * @Date: 2020/7/31 00:55
 * @Description:
 */
public class MemberService {
    public void login(String loginName,String loginPass){
        Handler validataHandler = new ValidataHandler();
        Handler loginHandler = new LoginHandler();
        Handler authHndler = new AuthHndler();

        validataHandler.next(loginHandler);
        loginHandler.next(authHndler);

        validataHandler.doHandler(new Member(loginName,loginPass));
    }
}
